﻿@using Telerik.Web.Mvc.UI
@using MvcFront.Models
@model IEnumerable<DocTemplateListViewModel>
@{
    ViewBag.Title = "Create";
}

<h2>Создать</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

Выбирете шаблон для документа

@(Html.Telerik().Grid(Model)
        .Name("DocTemplateListGrid")
                   .Columns(columns =>
                   {
                       columns.AutoGenerate(column =>
                       {
                           column.Width = "150px";
                           if (column.Member == "DocTemplateId")
                               column.Visible = false;
                       });
                       columns.Command(command =>
                       {
                           command.Custom("CreateDetails").Text("Создать")
                            .DataRouteValues(route => route.Add(o => o.DocTemplateId).RouteKey("id"))
                            .Action("Create", "DocumentAppointment")
                            .HtmlAttributes(new { style = "text-align: center" });
                       }).Width(50);
                   })
                 .Sortable()
                .Pageable()

    ) 
